package com.estudos.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;
@Service
public class IndexService {
	@Autowired
	ModelAndView view;
	public IndexService(){
		System.out.println("aaaaaaaaaa Inicializou indexServico!");
	}
	
	public ModelAndView showPgIndex(){
		view.setViewName("index");
		view.addObject("msg", "Sejam bem vindos ao projeto de estudo java spring mvc e hibernate!");
		return view;
	}
	
}
